<script setup>
import { onMounted } from 'vue'
onMounted(() => {})
</script>

<template>
  <router-view v-slot="{ Component, route }">
    <keep-alive>
      <component
        :is="Component"
        :key="route.path"
        v-if="route.meta.keepAlive"
      />
    </keep-alive>
    <component :is="Component" v-if="!route.meta.keepAlive" />
  </router-view>
</template>

<style lang="less">
ol {
  padding-left: 0.5rem;
  list-style: auto;
}
ul {
  padding-left: 0.5rem;
  list-style: disc;
}
/* 定义动画效果 */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.5s;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}
#refpop {
  max-height: 70%;
  padding: 0.7rem 0.2rem 0;
  border-radius: 0.3rem 0.3rem 0 0;
  display: flex;
  flex-direction: column;

  .info {
    flex: 1;
    overflow: auto;
    padding-bottom: 0.5rem;
    white-space: pre-wrap;

    p {
      line-height: 1.5;
      font-size: 0.24rem;
    }

    img {
      width: 100%;
      height: auto;
    }
  }

  .van-icon {
    font-size: 0.4rem;
    top: 0.2rem;
    right: 0.3rem;
  }
}
#evalutepop {
  top: 40%;
  width: 6.04rem;
  border-radius: 0.18rem;
  padding: 0.32rem;
  padding-top: 1rem;
  .btn {
    width: 3.76rem;
    height: 0.62rem;
    margin: 0 auto;
    line-height: 0.62rem;
    color: #fff;
    font-size: 0.22rem;
    text-align: center;
    border-radius: 0.33rem;
    background: #5496f2;
  }
  .form {
    margin-bottom: 0.4rem;
    .tags {
      font-size: 0.24rem;
      display: flex;
      flex-wrap: wrap;
      margin-bottom: 0.32rem;
      .tag {
        background-color: #f4f4f4;
        border-radius: 0.4rem;
        padding: 0.2rem 0.4rem;
        margin-right: 0.2rem;
        margin-bottom: 0.2rem;
        cursor: pointer;
      }
      .active {
        background-color: #4890c9;
        color: white;
      }
    }
    .item {
      color: #c9c9cc;
      font-size: 0.24rem;
      input {
        width: 100%;
        height: 0.7rem;
        border: none;
        border-bottom: 1px solid #c9c9cc;
        color: #222;
      }
    }
  }
}
#minepop {
  width: 82%;
  height: 100%;
  background: linear-gradient(180deg, #c4e9fd 0%, #f5f5f5 100%);
  display: flex;
  flex-direction: column;
  .mine {
    width: 100%;
    height: calc(100% - 1.5rem);
    padding: 0.16rem;
    display: flex;
    flex-direction: column;
    .infos {
      padding: 0.3rem 0.22rem;
      display: flex;
      .avatar {
        width: 1.08rem;
        height: 1.08rem;
        border-radius: 50%;
        border: 2px solid #c4d2fe;
      }
      .info {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        margin-left: 0.18rem;
        font-size: 0.28rem;
        color: #444;
        .top {
          display: flex;
          align-items: center;
          .name {
            font-size: 0.32rem;
            color: #222;
            font-weight: bold;
            margin-right: 0.08rem;
          }
          .identity {
            color: #ffffff;
            font-size: 0.2rem;
            padding: 0.1rem 0.16rem;
            background: linear-gradient(90deg, #378bfb 0%, #5bc0f5 100%);
            border-radius: 0.08rem;
            margin-left: 0.08rem;
          }
        }
        .academy {
          margin-top: 0.14rem;
        }
      }
    }
    .d-head {
      font-size: 0.28rem;
      .t {
        font-weight: bold;
        position: relative;
        padding-left: 0.4rem;
        &::before {
          content: '';
          position: absolute;
          width: 0.3rem;
          height: 0.3rem;
          top: 0.02rem;
          left: 0;
          background-image: url('../../assets/img/dialog.png');
          background-size: 100% 100%;
        }
      }
      .a {
        font-weight: bold;
        position: relative;
        padding-left: 0.4rem;
        &::before {
          content: '';
          position: absolute;
          width: 0.3rem;
          height: 0.34rem;
          top: 0.02rem;
          left: 0;
          background-image: url('../../assets/img/agentIcon.png');
          background-size: 100% 100%;
        }
      }
    }
    .dialogue-list {
      min-height: 3rem;
      max-height: calc(100vh - 6rem);
      // margin-bottom: 0.3rem;
      border-radius: 0.16rem;
      background-color: #fff;
      display: flex;
      flex-direction: column;
      padding-bottom: 0.3rem;
      .d-search {
        font-size: 0.28rem;
        color: #232732;
        display: flex;
        flex-direction: column;
        padding: 0 0.2rem;
        .input {
          // margin-top: 0.2rem;
          font-size: 0.24rem;
          color: #9c9c9b;
          border-radius: 0.34rem;
          padding: 0.2rem 0.32rem;
          background: #f2f2f2;
          position: relative;
          display: flex;
          align-items: center;
          img {
            width: 0.3rem;
            height: 0.3rem;
          }
          input {
            flex: 1;
            border: none;
            background: #f2f2f2;
            padding-left: 0.1rem;
          }
        }
      }
      .dlists {
        flex: 1;
        overflow-y: auto;
        margin-top: 0.24rem;
        .item {
          line-height: 0.5rem;
          color: #444444;
          font-size: 0.26rem;
          .content {
            padding: 0.12rem 0.28rem;
          }
          .content.active {
            background-color: #f2f2f2;
          }
          .type {
            padding-top: 0.2rem;
            border-top: 1px solid #e4ebf4;
          }
        }
        .title {
          color: #78848e;
          font-size: 0.24rem;
          padding: 0 0.28rem;
          margin-top: 0.12rem;
        }
        .title:first-child {
          padding: 0 0.28rem;
          margin-top: 0;
          .type {
            border: none;
            padding-top: 0;
          }
        }
      }
      .entities {
        overflow-y: auto;
        max-height: calc(100vh - 6rem);
        padding-bottom: 0.2rem;
        .item {
          display: flex;
          align-items: center;
          line-height: 0.5rem;
          // box-shadow: 0px 2px 4px 0px rgba(109, 122, 134, 0.5);
          // box-shadow: inset 0px 0.02rem 0.16rem 0px rgba(13, 85, 255, 0.09);
          // border-radius: 0.16rem;
          // background-color: #fff;
          margin: 0.1rem 0.2rem;
          padding: 0.1rem 0.2rem;
          img {
            width: 0.72rem;
            height: 0.72rem;
            border-radius: 50%;
            margin-right: 0.2rem;
          }
          .content {
            flex: 1;
            overflow: hidden;
            .item-content-title {
              font-family: PingFangSC, PingFang SC;
              font-weight: 500;
              font-size: 0.26rem;
              color: #070707;
              overflow: hidden;
              text-overflow: ellipsis;
              white-space: nowrap;
              word-break: break-all;
            }
            .item-content-info {
              font-family: PingFangSC, PingFang SC;
              font-weight: 400;
              color: #989898;
              font-size: 0.22rem;
              overflow: hidden;
              text-overflow: ellipsis;
              white-space: nowrap;
              word-break: break-all;
            }
          }
        }
      }
      .edit-popover {
        position: fixed;
        left: 0;
        top: 0;
        width: 98px;
        height: 94px;
        background: #fefefe;
        box-shadow: 0px 2px 4px 0px rgba(109, 122, 134, 0.5);
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        .ops {
          display: flex;
          justify-content: flex-start;
          align-items: center;
          color: #333;
          font-size: 16px;
          width: 100%;
          height: 40px;
          padding-left: 12px;
          img {
            width: 16px;
            height: 16px;
            margin-right: 10px;
          }
        }
        .delete {
          color: #ff001e;
        }
      }
    }
  }
  .add-new {
    margin: 0.3rem auto 0;
    background: #4792e4;
    padding: 0.24rem 0.56rem 0.24rem 0.8rem;
    border-radius: 0.48rem;
    font-size: 0.28rem;
    color: #fff;
    position: fixed;
    bottom: 0.6rem;
    // 居中
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
    &::before {
      content: '';
      position: absolute;
      width: 0.3rem;
      height: 0.3rem;
      top: 0.25rem;
      left: 0.4rem;
      background-image: url('../../assets/img/add2.png');
      background-size: 100% 100%;
    }
  }
}
#namepop {
  .change-name {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.32rem;
    color: #000;
    background-color: white;
    border-radius: 0.32rem 0.32rem 0px 0px;
    .title {
      font-size: 0.3rem;
      font-weight: bold;
    }
    input {
      width: 100%;
      background: #eef0f6;
      border-radius: 0.2rem;
      border: 0.5px solid #398efa;
      padding: 0.24rem 0.3rem;
      margin-top: 0.44rem;
    }
    .btns {
      margin-top: 0.32rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 0.3rem;
      .btn {
        width: 3.38rem;
        padding: 0.18rem 0;
        text-align: center;
        background: #eef0f6;
        border-radius: 0.2rem;
        color: #8f9093;
      }
      .confirm {
        background: #4792e4;
        color: white;
      }
    }
  }
}
.van-overlay {
  background-color: rgba(0, 0, 0, 0.5);
}
</style>
